package com.itheima.service;

import com.itheima.dao.impl.EmployeeImpl;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Aspect
public class EmployeeService {
    @Autowired
    EmployeeImpl employee;

    @Transactional
    public void checkout(String username1,String username2, Double money){

        employee.reduceAccounts(username1,money);

		//int i = 1/0;
        employee.addAccounts(username2,money);

    }
}
